'use strict'
import request from '@/utils/request'
/**
 * 字典
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'post',
    data: { dictCode }
  })
}
/**
 * 荣誉分类
 */
export function getSysClassfiy(classifyType) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysClassify/getClassifyTree',
    method: 'post',
    data: classifyType
  })
}
/**
 * 添加分类
 */
export function insertClassfiy(insertClassfiy) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysClassify/insert',
    method: 'post',
    data: insertClassfiy
  })
}
/**
 * 更新分类状态
 */
export function updateStatus(status) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysClassify/updateStatus',
    method: 'post',
    data: status
  })
}
/**
 * 编辑分类
 */
export function updateClassfiy(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysClassify/update',
    method: 'post',
    data: data
  })
}
/**
 * 删除分类
 */
export function deleteById(id) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysClassify/deleteById',
    method: 'post',
    data: { id }
  })
}
/**
 * 移动分类
 */
export function moveSort(move) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysClassify/moveSort',
    method: 'post',
    data: move
  })
}
/**
 * 查询荣誉列表
 * @param {*} data
 */
export function proofList(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/honorManage/queryPage',
    method: 'post',
    data
  })
}
/**
 * 新建荣誉
 * @param {*} data
 */
export function addproof(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/honorManage/insert',
    method: 'post',
    data
  })
}
/**
 * 编辑获取详情
 * @param {*} data
 */
export function proofdetail(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/honorManage/get',
    method: 'post',
    data
  })
}
/**
 * 编辑
 * @param {*} data
 */
export function updateProof(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/honorManage/update',
    method: 'post',
    data
  })
}
/**
 * 删除荣誉
 * @param {*} data
 */
export function delproof(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/honorManage/deleteById',
    method: 'post',
    data
  })
}
/**
 * 批量删除荣誉
 * @param {*} data
 */
export function delsproof(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/honorManage/deleteByIds',
    method: 'post',
    data
  })
}
/**
 * 预览
 * @param {*} data
 */
export function previewImg(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/honorManage/preview',
    method: 'post',
    responseType: 'blob',
    data
  })
}

/* ********/
/**
 * 新建完成条件
 * @param {*} data
 */
export function honorSeriesInsert(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/honorSeries/insert',
    method: 'post',
    data
  })
}

/**
 * 编辑完成条件
 * @param {*} data
 */
export function honorSeriesUpdate(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/honorSeries/update',
    method: 'post',
    data
  })
}

/**
 * 完成条件详情
 * @param {*} data
 */
export function honorSeriesGet(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/honorSeries/get',
    method: 'post',
    data
  })
}

/**
 * 完成条件列表
 * @param {*} data
 */
export function honorSeriesPage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/honorSeries/queryPage',
    method: 'post',
    data
  })
}

/**
 * 删除完成条件
 * @param {*} data
 */
export function honorSeriesDel(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/honorSeries/deleteById',
    method: 'post',
    data
  })
}

/**
 * 新建 编辑关联条件
 * @param {*} data
 */
export function RelevanceInsert(url, data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: url,
    method: 'post',
    data
  })
}

/**
 * 分页查询关联条件
 * @param {*} data
 */
export function RelevancePage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/honorSeriesRelevance/queryPage',
    method: 'post',
    data
  })
}

/**
 * 删除关联条件
 * @param {*} data
 */
export function RelevanceDel(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/honorSeriesRelevance/deleteById',
    method: 'post',
    data
  })
}

// 获取指定数据
export function getResource(url, data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: url,
    method: 'post',
    data
  })
}// 获取指定数据
export function getTem(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/templatePool/query',
    method: 'post',
    data
  })
}
